const CreateAclRequest = {
    name: {
        type: "string",
        required: true,
        description: "权限名称",
        example: "添加用户",
        format: /^[\w\W]{2,20}$/,
    },
    type: {
        type: "number",
        required: true,
        description: "1 表示：前端视图权限，2 表示：后端接口权限",
        example: 1,
        format: /^[12]{1}$/,
    },
    path: {
        type: "string",
        required: false,
        description: "权限对应的访问路径",
        example: "/users",
    },
    method: {
        type: "string",
        required: false,
        description: "权限对应的访问方式",
        example: "POST",
    },
};

const QueryAclRequest = {
    type: {
        type: "string",
        required: false,
        description: "权限类型，1：视图权限，2：接口权限",
        example: 1,
        format: /^[12]{1}$/,
    },
};

module.exports = {
    CreateAclRequest,
    QueryAclRequest,
};
